
import urllib
import requests
import threading
from time import ctime,sleep

from torch import rand
 
import random

url = "http://180.184.70.56/api/v1/student/book_course"
def get_data(course_id, student_id):
    return {"StudentId" : str(student_id), "CourseId" : str(course_id)}
 
def t1():
  for i in range(5):
    course_id = random.randint(1,12)
    student_id = random.randint(1,100)
    datas = get_data(course_id, student_id)
    res = requests.post(url, data = datas)
    print(res)
 
if __name__ == '__main__':
  threads=[]
  for i in range(1):
    t = threading.Thread(target=t1, args=())
    threads.append(t)
 
 
  for t in threads:
    t.start()
  t.join()